package components.base
{
	import spark.components.Image;
	
	import framework.LangMgr;
	
	import interfaces.IDispose;
	
	public class BaseImage extends Image implements IDispose
	{
		/**附带数据**/
		public var data:Object;
		
		/**
		 * 国际化标识
		 */
		private var _locale:String;
		public function get locale():String
		{
			return _locale;
		}
		public function set locale(p_str:String):void
		{
			_locale = p_str;
			resourcesChanged();
		}
		
		public function BaseImage()
		{
			super();
		}
		
		/**
		 * 实现国际化
		 */
		override protected function resourcesChanged():void
		{
			super.resourcesChanged();
			if(_locale)
				toolTip = LangMgr.getResourceByLocaleKey(_locale);
		}
		
		public function dispose():void
		{
			
		}
	}
}